<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css"/>

    <style>
        .err{
        color:red
        }
        .img,img{
        width:120px;
        display:inline-block;
        }


    </style>
</head>
<body>
<form method="post" novalidate>
    {% csrf_token %}
    {%for i in form%}
        {%if i.label == '验证码' %}
            <div>{{i.label}}:{{i}}<img src="/yanzhengma/" alt=""></div>
        {%else%}
            <div>{{i.label}}:{{i}}</div>
        {%endif%}
        {%if i.errors%}
            <span class="err">{{i.errors.0}}</span>
        {%endif%}
    {%endfor%}
    <div></div>
    <input type="submit" value="提交">
</form>
</body>
</html>